public class Main {
    public static void main(String[] args) {
         long start =System.currentTimeMillis();
         String s = "";
         for (int i = 0; i<9999; i++){
             s = s + i + "";
         }
         long end = System.currentTimeMillis();
         System.out.println(end - start);
         start = System.currentTimeMillis();
         StringBuffer stringBuffer = new StringBuffer("");
         for (int i= 0; i< 9999;i++){
             stringBuffer.append(i + "");
         }
         end = System.currentTimeMillis();
         System.out.println(end - start);
        }
    }


